﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;

namespace MyWebApp.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class ExceptionFilterController : ControllerBase
    {

        /// <summary>
        /// 测试:手动抛出一个未捕获异常
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public ActionResult Test()
        {
            throw new Exception("Oh,My God,A Exception Occurred......");
        }
    }
}
